<!DOCTYPE html>
<!--
Copyright (C) 2015 Vishal Gupta<ims.vishal@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>LocalVsGlobal</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script>
            var a = 1;
            b = 2;

            function x() {
                c = 3;
                window.e = 3;
                var d = 5;
            }

            function display() {
                x();
                console.log('a : ' + a);
                console.log('b : ' + b);
                console.log('c : ' + c);
                console.log('e : ' + e);
                console.log('d : ' + d);
            }
        </script>
    </head>
    <body>
        <button onclick="display();">Execute</button>
        <script src="js/jquery.min.js"></script>
    </body>
</html>